package Computer;
import memory.Memory;


public class Computer {
	private Memory memory;
	private ProgramCounter counter;
	private Program program;
	
	public Computer(Memory memory){
		this.memory = memory;
	}
	
	public void load(Program program){
		this.program = program;
		counter = new ProgramCounter();
	}
	public void run(){
		while(counter.getCurrent() >= 0){			
			program.get(counter.getCurrent()).execute(memory, counter);
		}
	}

}
